from api.depart_api import DepartApi
from common.token_util import TokenUtil


class DepartUtil:

    # 封装一个获取部门id方法
    @classmethod
    def get_departId(cls):
        token = TokenUtil.get_token()
        body = {"name": "测试01", "code": "12334"}
        resp = DepartApi.add_depart_api(token, body)
        depart_id = resp.json().get("data").get("id")
        return depart_id


if __name__ == '__main__':
    print(DepartUtil.get_departId())
